package com.tourism.home.service;

import com.tourism.home.entity.*;
import com.tourism.home.dao.CollectionDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectionService {
    @Autowired
    CollectionDao collectionDao;

    public List<User> getUserCollectionUserByUID(Integer uid){ return collectionDao.getUserCollectionUserByUID(uid);}

    public List<Forum> getUserCollectionForumByUID(Integer uid){ return collectionDao.getUserCollectionForumByUID(uid);}

    public List<Post> getUserCollectionPostByUID(Integer uid){ return collectionDao.getUserCollectionPostByUID(uid);}

    public Integer getUserCollectionNumsByUID(Integer uid){ return collectionDao.getUserCollectionNumsByUID(uid);}

    public Integer deleteUserCollectionByUIDAndOID(Integer id){return collectionDao.deleteUserCollectionByUIDAndOID(id);}

    public List<Integer> getCollectionPostUids(Integer oid){return collectionDao.getCollectionPostUids(oid);}
    public List<Integer> getCollectionUserUids(Integer oid){return collectionDao.getCollectionUserUids(oid);}
    public List<Integer> getCollectionForumUids(Integer oid){return collectionDao.getCollectionForumUids(oid);}

    public Integer addCollectionU(Integer uid,Integer ouid){return collectionDao.addCollectionU(uid,ouid);}
    public Integer addCollectionF(Integer uid,Integer ofid){return collectionDao.addCollectionF(uid,ofid);}
    public Integer addCollectionP(Integer uid,Integer opid){return collectionDao.addCollectionP(uid,opid);}

    public Integer deleteCollectionU(Integer uid,Integer ouid){return collectionDao.deleteCollectionU(uid,ouid);}
    public Integer deleteCollectionF(Integer uid,Integer ofid){return collectionDao.deleteCollectionF(uid,ofid);}
    public Integer deleteCollectionP(Integer uid,Integer opid){return collectionDao.deleteCollectionP(uid,opid);}

    public List<User> getUserFollowersByUID(Integer oid){return collectionDao.getUserFollowersByUID(oid);}
    public   List<Message> getMessageByUID(Integer uid){return collectionDao.getMessageByUID(uid);}

    public Integer updateCollectionStatus(Integer uid){return collectionDao.updateCollectionStatus(uid);}


}
